package com.nursebetty.droid.client.activity;

import java.io.InputStream;

import org.apache.http.HttpEntity;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.nursebetty.droid.client.model.User;
import com.nursebetty.droid.client.util.Util;

public class Glucoss extends Activity {
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.glucose);
        
        final User user = (User) getIntent().getSerializableExtra("user");
        
        
        Button weightBtn = (Button)findViewById(R.id.glucoseSaveBtn);
        weightBtn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				try {
					InputStream response = Util.OpenHttpConnection("http://www.google.com/");
					Log.i("info", Util.generateString(response));
					//Log.i("info",response.getContent().toString());
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
//				Intent i = new Intent(Main.this, Main.class);
//				Bundle b = new Bundle();
//				b.putSerializable("user", user);
//				i.putExtras(b);
//				
//				startActivity(i);
				
			}
        	
        	
        });
	}
}
